<@mits.headerDiv />
<div class="Main" id="Main">
	<!--屏幕切换-->
	<!--左边-->

	<!--右边-->
	<div class="Main_body" id="Main_body">
		<div class="Main_right_top">
			<div class="Main_bodyListBar_head">搜索条件 </div>
			 <br>
					  <form name="roleListForm" id ="roleListForm" action="" method="post">
					  <table border="0" cellspacing="1" cellpadding="0" class="addTable" >
                        <tr>
                            <td class="title">角色名称：</td>
                          <td class="content" >
                          <input type="text" name="roleName" id="roleName" value=""  /> 
                         
                          </td>
                          <td  align="right">
                          <input type="button" class="button" value="查询" onClick="searchRole(0)" />
                          <input type="button" class="button" value="新增角色" onclick="addRole()" />
                          </td>                        
                        </tr>  
                        </table>
                        </form>                      
			</div>
		<div class="Main_right_line"></div>
		
		  <div class="Main_bodyListBar">
				<div class="Main_bodyListBar_head"><span>角色列表</span> </div>
				<@mits.showActionMsg />
				
	    <div class="Main_bodyListBar_body">
				  <table border="0" cellpadding="0" cellspacing="0" class="listTable">
					<tr>
					  
					  <th nowrap>角色名称</th>
					  <th nowrap>角色说明</th>
					  <th nowrap>状态</th>
					 <th nowrap >管理角色</th>
			        </tr>

                    <#if platformRoleResult?exists>
                        <#list platformRoleResult.content as platformRole>
		                    <tr >
		                       <td>${platformRole.roleName?html}&nbsp;</td>
		                       <td>${platformRole.memo?if_exists?html}&nbsp;</td>
		                       <td><#if platformRole.status ==1>有效</#if><#if platformRole.status ==0>无效</#if>&nbsp;</td>
		                       <td>
		                       <a href="${base}/auth/system/viewRole.action?roleId=${platformRole.id?if_exists}">查看</a> <a href="javascript:void(0);onClick=deleteRole('${platformRole.id?if_exists}')"> 删除</a> 		                    
		                      </td>
		                    </tr>
                    </#list>
			 <@mpage.fillLine pageSize, platformRoleResult.content.size(), 4/>
                <tr class="foot">
                  <td colspan="3">
                    <#assign page = platformRoleResult.page>
                    <script language = 'JavaScript'>
                        function changePage(cpage){
                           // window.location="${base}/auth/system/initRoleList.action?currentPage="+cpage;
                           searchRole(cpage)
                        }
                    </script>
                    <@mpage.showPageInfo page/>
                  &nbsp;</td>
                </tr>
                </#if>
				  </table>
			</div>
				<div class="Main_bodyListBar_bottom">
				  <div class="Main_bodyListBar_button"> 
				  </div>
					
				</div>
			<div class="Main_bodyListBar_foot"></div>
		  </div>
		</div>
	
</div>
<script language="javascript">
  function searchRole(cpage) {
    $('roleListForm').action = "${base}/auth/system/initRoleList.action?infowarelab_backupParam=true&currentPage="+cpage;
    $('roleListForm').submit();
  }
    function searchReset()
  {
   $('roleListForm').reset();
  }
  function addRole() {
    $('roleListForm').action = "${base}/auth/system/initAddRole.action";
    $('roleListForm').submit();
  }
  function deleteRole(roleId) {
   if(confirm('确认要删除?')){
    $('roleListForm').action = "${base}/auth/system/deleteRole.action?roleId="+roleId;
    $('roleListForm').submit();
   } 
  }  
</script>
<@mits.footerDiv />


